<?php
/**
 * 站点管理
 *
 * Created	  	: 2011-10-10
 * Modified   	: 2011-10-10
 * @link		: http://www.fqeat.com
 * @copyright	: (C) 2011
 * @version	: 0.1.0
 * @author		: Joseph Chen (jsph.chen@gmail.com)
 */
switch ($do) {
	
	case 'save':
		$_POST['id'] = (int)$_POST['id'];
		if ($_POST['id']) {
			$ret = Site::modify();
		} else {
			$ret = Site::add();
		}
		if (!$ret) {
			$type = 'Failure';
			$desc = App::msg();
		}
		$redirctMo = 'siteList';
		break;
	default:
		$type = 'Error';
		$desc = $GLOBALS['LUnknowRequest'];
		break;
		
}
$g_msg = array(
	'type' => isset($type) ? $type : 'Success',
	'desc' => isset($desc) ? $desc : $GLOBALS['LSuccess'],
);
if (empty($redirctMo)) {
	$redirctMo = 'siteList';
}
empty($r_url) && $r_url = '?block=base&mo='.$redirctMo;